package com.vsd.service;

import java.util.Collection;
import java.util.List;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import com.shopcart.domain.Store;
import com.zy.store.proto.MOAppStore.MStore;
import com.zy.store.proto.MOAppStore.MStoreMiniList;

public interface StoreService {

	Collection<Store> findAll();

	Store findByAccountAndPassword(String account,String password);
	
	Page<Store> findByPhone(String phone,Pageable p);

	Page<Store> findByIdIn(List<String> ids,Pageable p);
	
	Store findById(String id);
	
	MStore.Builder findStoreDetail(String id,String userId);
	
	MStoreMiniList.Builder selectAppList(String cateCode,String key,String areaCode,String lat,String lng,Integer page,Integer limit,Integer sort);

	Page<Store> findAll(Pageable p);

	Page<Store> findByNameLike(String name, Pageable p);

	Store save(Store store);

	int update(Store s) throws Exception;
	
	Page<Store> findAreaCode(String areaCode,Pageable p);
	
	Page<Store> findAreaCodeAndNameLike(String areaCode,String name,Pageable p);

	String findStore(String id, String userId);

	String selectList(String cateCode, String areaCode, String lat, String lng,
			Integer page, Integer limit);

}
